The bearing device for a wheel has evolved from a structure called first generation in which roller bearings in double rows are independently used to second generation in which a vehicle body attachment flange is integrally provided in an outer member. Further, third generation in which one inner raceway surface of the roller bearings in double rows is integrally formed with an outer circumference of a hub wheel integrally having a wheel attachment flange has been developed. Further, fourth generation in which a constant velocity universal joint is integrated with the hub wheel and the other inner raceway surface of the roller bearings in double rows is integrally formed with an outer circumference of an outer joint member constituting the constant velocity universal joint has been developed.
For example, the bearing device for a wheel called third generation is described in Patent Document 1. The bearing device for a wheel called third generation includes, as illustrated in FIG. 22, a hub wheel 102 having a flange 101 extending in an outer diameter direction, a constant velocity universal joint 104 having an outer joint member 103 fixed to this hub wheel 102, and a roller bearing having an outer member 105 arranged on an outer circumferential side of the hub wheel 102.
The constant velocity universal joint 104 includes the outer joint member 103, an inner joint member 108 arranged in a cup-shaped section 107 of this outer joint member 103, a ball 109 arranged between this inner joint member 108 and the outer joint member 103, and a cage 110 that retains this ball 109. A spline section 111 is formed on an inner circumferential surface of a center hole of the inner joint member 108. An end spline section of a shaft (not shown) is inserted into this center hole, whereby the spline section 111 on the inner joint member 108 side and the spline section on the shaft side are engaged.
Further, the hub wheel 102 includes a cylinder section 113 and the flange 101. A short-cylindrical pilot section 115, on which a wheel and a brake rotor (not shown) are mounted, is protrudingly provided on an outer end surface 114 (end surface on an opposite joint side) of the flange 101. Note that, the pilot section 115 includes a large-diameter first section 115a and a small-diameter second section 115b. The brake rotor is externally fitted onto the first section 115a, and the wheel is externally fitted onto the second section 115b. 
Then, a notch section 116 is provided in an outer circumferential surface at an end portion on the cup-shaped section 107 side of the cylinder section 113. An inner race 117 is fitted in this notch section 116. A first inner raceway surface 118 is provided near a flange on an outer circumferential surface of the cylinder section 113 of the hub wheel 102. A second inner raceway surface 119 is provided on an outer circumferential surface of the inner race 117. Further, a bolt inserting hole 112 is provided in the flange 101 of the hub wheel 102. A hub bolt for fixing the wheel and the brake rotor to this flange 101 is inserted into this bolt inserting hole 112.
In the outer member 105 of the roller bearing, double-row outer raceway surfaces 120, 121 are provided on an inner circumference thereof, and a flange (vehicle body attachment flange) 132 is provided on an outer circumference thereof. A first outer raceway surface 120 of the outer member 105 and the first inner raceway surface 118 of the hub wheel 102 are opposed to each other. A second outer raceway surface 121 of the outer member 105 and the raceway surface 119 of the inner race 117 are opposed to each other. Rolling elements 122 are interposed between those inner and outer raceway surfaces. That is, an inner member of the roller bearing is constituted by the inner race 117 and a part of the outer surface of the hub wheel 102.
A shaft section 123 of the outer joint member 103 is inserted into the cylinder section 113 of the hub wheel 102. In the shaft section 123, a screw section 124 is formed at an end of a reverse cup-shaped section thereof. A spline section 125 is formed between this screw section 124 and the cup-shaped section 107. Further, a spline section 126 is formed in an inner circumferential surface (inner surface) of the cylinder section 113 of the hub wheel 102. When this shaft section 123 is inserted into the cylinder section 113 of the hub wheel 102, the spline section 125 on the shaft section 123 side and the spline section 126 on the hub wheel 102 side are engaged.
A nut member 127 is screwed onto the screw section 124 of the shaft section 123 projecting from the cylinder section 113. The hub wheel 102 and the outer joint member 103 are connected. An inner end surface (rear surface) 128 of the nut member 127 and an outer end surface 129 of the cylinder section 113 come into contact with each other and an end surface 130 on the shaft section side of the cup-shaped section 107 and an outer end surface 131 of the inner race 117 come into contact with each other. In other words, when the nut member 127 is tightened, the hub wheel 102 is nipped by the nut member 127 and the cup-shaped section 107 through an intermediation of the inner race 117.